//
//  ST_BTMomentsModel.swift
//  btvideo
//
//  Created by mac on 2020/1/16.
//  Copyright © 2020 JarvanZhang. All rights reserved.
//

import UIKit
import HandyJSON

class ST_BTMomentsModel: NSObject , HandyJSON{
    var accid = ""
    var avatar = ""
    var nickname = ""
    var vd_address = ""
    var distance = ""
    var feature_name = ""
    var feature_id = 0
    var group_id = 0
    var create_time = 0.0
    var content = ""
    var video_url = ""
    var feature_content_id = 0
    var thumb_type = 0
    var address = ""
    var time_tip = ""
    var address_more = ""
    var width = 0.0
    var height = 0.0
    
    var cellHeight = 100.cgFloat
    
    
    required override init() {
        super.init()
    }
    
    func figure_out_cell_height()  {
        
        
        let imageDisplayWidth = ScreenWidth - 40
        
        let imgW = width < 1 ? 1 : width
        
        var imageDisplayHeight = imageDisplayWidth / imgW.cgFloat * height.cgFloat
        
        if imageDisplayHeight < 200{
            imageDisplayHeight = 200
        }else if imageDisplayHeight > 400{
            imageDisplayHeight = 400
        }
        
        cellHeight = imageDisplayHeight + 80 + 50
        
        
        
    }
    
}
